const head = document.getElementsByTagName('head')[0];
const loadStyle = url => {
    const link = document.createElement('link');
    link.type = 'text/css';
    link.rel = 'stylesheet';
    link.href = url;
    head.appendChild(link);
};

const loadScript = url => {
	const script = document.createElement('script');
	script.type = 'text/javascript';
	script.src =url;
	head.appendChild(script);
};

// 配置编译环境和线上环境之间的切换
let iconfontVersion = ['4677659_qklf58jh9f8','4685216_ls67j5sgpds','4685216_nc5ofuusaka'];
let iconfontUrl = `//at.alicdn.com/t/c/font_$key.css`;
let svgfontUrl = `//at.alicdn.com/t/c/font_$key.js`
export {
	loadStyle,
    iconfontUrl,
    iconfontVersion,
	svgfontUrl,
	loadScript
}